package org.grow.bill.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Data;
import org.springframework.data.annotation.Id;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @Author: xwg
 * @CreateDate: 21-8-11
 */
@TableName("CommodityBatch")
@Data
public class CommodityBatch {

    @TableId(type = IdType.AUTO)
    private Integer batchId;
    private String batchCode;

//商品的外键
    private String commodityFk;
    private String commodityDescr;
//    采购单的外键
    private String purchaseBillFk;
//  预计数量
    private Integer advanceQuantity;
//  计数单位 箱/盒
    private String unit;
//    采购批发单价
    private BigDecimal purchasePrice;
//
    private Integer actualQuantity;

//   生产日期
    private LocalDate expirationStart;
    private LocalDate expirationStop;

//    private Integer days;
    private Integer remainingQuantity;

    @Version
    private Integer version=0;

    private Boolean isDeleted;
}
